from typing import Literal,Optional,Union
from APP.common.schema import SchemaBase
from pydantic import Field,BaseModel

class ExtractEntityModel(BaseModel):
    name: str = Field(..., description="实体名称")
    type: Literal["brand", "product", "person", "location", "organization", 'skill',"other"] = Field(..., description="实体类型, 可选值: brand/product/person/location/organization/skill/other")
    value: str = Field(..., description="实体值")
    confidence: float = Field(..., description="置信度, 范围0-1")
    context: str = Field(..., description="实体出现的上下文")

class EntityCollection(BaseModel):
    entities: list[ExtractEntityModel] = Field(..., description="所有实体列表")

class EmpCompetencyModel(BaseModel):
    #综合评估
    competency: str = Field(..., description="综合评估员工是否胜任此岗位，说明员工的优势及和岗位匹配度，字数要求200字以内")
    #核心优势
    core_advantage: Union[str,dict] = Field(..., description="对员工优势的指标标签逐个分析并做300字左右的总结描述")
    #不足建议
    insufficient_suggestion: Union[str,dict] = Field(..., description="重点根据员工不足的指标标签，再结合岗位要求，给出如何弥补不足的合理建议")
    #发展路径建议
    suggestion: Union[str,dict] = Field(..., description="根据岗位要求和员工自身的指标标签内容，从人力资源的角度给该员工提出专业的能力提升建议，按照短期（6个月）、中期（1年）、长期（3年）这三个时间维度给出合理的建议")

    
